<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #div0{
            display: flex;
            width: 400px;
            height: 500px;
            background-color: violet;
        }
        #div0 div{
            width: 200px;
            height: 200px;
            background-color: yellow;
            /*设置基本宽度,一旦设置 width将失效*/
            /*flex-basis: 50px;*/
            /*flex-basis: 30%;*/
        }
        /*
            400-600=-200
            200/4=50
            300-50=250
            300-150=50
        */
        #div0 div:nth-child(1){
            /*flex-basis: 300px;*/
            /*flex-grow: 1;*/
            /*!*缩小比例*!*/
            /*flex-shrink: 1;*/
            /* 设置放大比例 缩小比例 基本宽度 */
            flex: 1 1 300px
        }
        #div0 div:nth-child(2){
            /*flex-basis: 300px;*/
            /*flex-grow: 4;*/
            /*!*缩小比例*!*/
            /*flex-shrink: 3;*/
            flex: 4 3 300px
        }
    </style>
</head>
<body>
    <div id="div0">
        <div></div>
        <div></div>

    </div>
</body>
</html>
